<%@page import="com.mmy.domain.plane.TPlanePlan"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>
<title>航班时刻信息</title>
</head>
<body>
	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
			<main class="at-padding-large-bottom">
			<article>		
	<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
		<div class="page-header container">
			<h2>航班时刻信息</h2>			
		</div>
	</header>
	<section class="container">
	

			<div>
				<a href="planeorg" >航空公司</a> | 
				<a href="planeplan" >航班时刻</a> | 
				<a href="planebase" >航班信息</a> | 
				<a href="planeairport" >机场信息</a> 
				<hr style="FILTER: alpha(opacity=100,finishopacity=0,style=3); margin: 15px; " width=100%; color=#F9F6E5 SIZE=3></h>
				
				<form action="subcreateplaneplan" method="post" >
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>新建航班时刻信息
						</h4>
				<div >
				<table class="info-table" >
				<tr>
					<th>标准</th>
					<td>
						<input type="text" name="Standard" maxlength="64" required/><span class="mustWrite">*</span>
					</td>
					<th>航班名称</th>
					<td>
						<select class="input-select-vlign" name="PlaneID" >
								<option style="display: none;">请选择</option>
							<c:forEach var="po" items="${planebaselist}">
								<option value="${po.getPlaneID()}">${po.getPlaneName()}</option>
							</c:forEach>	
						</select>
					</td>
				</tr>
				<tr id="out">

					
				</tr>
				<tr id="in">

					
				</tr>
				
				<tr>
					<th>出发时刻</th>
					<td>
						<input type="datetime-local" name="startTime" required/><span class="mustWrite">*</span>
					</td>
					<th>到达时刻</th>
					<td>
						<input type="datetime-local" name="endTime"  required/><span class="mustWrite">*</span>
					</td>
				</tr>
				<tr>
					<th>底价</th>
					<td>
						<input type="number" name="Floor" maxlength="18" required/><span class="mustWrite">*</span>
					</td>
					<th>同业价</th>
					<td>
						<input type="number" name="Peer" maxlength="18" required/><span class="mustWrite">*</span>
					</td>
				</tr>
				<tr>
					<th>对外报价</th>
					<td>
						<input type="number" name="Price" maxlength="18" required/><span class="mustWrite">*</span>
					</td>
					<th>数量</th>
					<td>
						<input type="number" name="Number" maxlength="16" required/><span class="mustWrite">*</span>
					</td>
				</tr>
				<tr>
					<th>备注</th>
					<td colspan="3">
						<textarea name="Memo" maxlength="256" ></textarea>
					</td>
				</tr>	
					
				</table>
				<center>
				<input type="submit" class="btn" value="保存" />
				<input type="button" class="btn" value="返回" onclick="rehidder()"/>
				</center> 
				
							
							
				</div>
				</form>
			</div>
			</section>
			</article>
			</main>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
		</div>
		
		<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
	
<script type="text/javascript">


//一行拼接完毕，加载一级菜单
$.ajax({
	url: 'getLevel1',
	data: {},
	dataType: 'json',
	success: function(result) {
	// console.log("result"+result);
	
	$.each(result,function(index,element){
		
		 var tr = $("#out");
        tr.find(".ZoneID").append("<option value='"+element.zoneID+"'>"+element.zoneName+" </option>");
        
        var tr1 = $("#in");
        tr1.find(".ZoneID").append("<option value='"+element.zoneID+"'>"+element.zoneName+" </option>");
	        });
	    }
	})
	
window.onload = function(){
    /* 出发地 */
    var tr = $("#out");
    tr.append($("<th>出发洲</th>"));
	tr.append($("<td></td>").html(
		"<select class='input-select-vlign ZoneID'  emptyOption='false'  onchange='changeSelect(this,\"getLevel2\",\"level1\",\"ZoneOutID\")'  >" +
		"<option>---请选择---</option>" +
		"</select>")
	);
    
	tr.append($("<th>出发国家</th>"));
	tr.append($("<td></td>").html(
		"<select class='input-select-vlign ZoneOutID' name='ZoneOutID' emptyOption='false'  onchange='changeSelect1(this,\"getLevel5\",\"level2\",\"AirportOutID\")'  >" +
		"<option>---请选择---</option>" +
		"</select>")
	);
 
	/* 出发机场 */
	tr.append($("<th>出发机场</th>"));
	tr.append($("<td></td>").html(
		"<select class='input-select-vlign AirportOutID' name='AirportOutID' emptyOption='false' onchange='changeSelect1(this,\"\",\"level5\",\"\")' >" +
		"<option>---请选择---</option>" +
		"</select>")
	);
	
	
	 /* 到达地 */
    var tr1 = $("#in");
	 
    tr1.append($("<th>到达洲</th>"));
	tr1.append($("<td></td>").html(
		"<select class='input-select-vlign ZoneID'  emptyOption='false'  onchange='changeSelect(this,\"getLevel2\",\"level1\",\"ZoneInID\")'  >" +
		"<option>---请选择---</option>" +
		"</select>")
	);
	 
	tr1.append($("<th>到达国家</th>"));
	tr1.append($("<td></td>").html(
		"<select class='input-select-vlign ZoneInID' name='ZoneInID' emptyOption='false'  onchange='changeSelect1(this,\"getLevel5\",\"level2\",\"AirportInID\")'  >" +
		"<option>---请选择---</option>" +
		"</select>")
	);
 
	/* 到达机场 */
	tr1.append($("<th>到达机场</th>"));
	tr1.append($("<td></td>").html(
		"<select class='input-select-vlign AirportInID' name='AirportInID' emptyOption='false' onchange='changeSelect1(this,\"\",\"level5\",\"\")' >" +
		"<option>---请选择---</option>" +
		"</select>")
	);
}	
	
</script>


</body>

</html>